package com.aizuda.boot.modules.business.performancePlan.mapper;

import com.aizuda.boot.modules.business.performancePlan.entity.PaymentPlanEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 付款计划 Mapper 接口
 */
@Mapper
public interface PaymentPlanMapper extends BaseMapper<PaymentPlanEntity> {

    /**
     * 根据合同ID查询付款计划列表
     *
     * @param contractId 合同ID
     * @return 付款计划列表
     */
    List<PaymentPlanEntity> selectByContractId(@Param("contractId") Integer contractId);

    /**
     * 根据合同ID删除付款计划
     *
     * @param contractId 合同ID
     * @return 删除记录数
     */
    int deleteByContractId(@Param("contractId") Integer contractId);

    /**
     * 根据计划组ID查询付款计划列表
     *
     * @param planGroupId 计划组ID
     * @return 付款计划列表
     */
    List<PaymentPlanEntity> selectByPlanGroupId(@Param("planGroupId") Integer planGroupId);
}
